package com.varian.service.remote;

import com.varian.tool.contant.VarianConstant;
import com.varian.tool.result.R;
import jakarta.validation.constraints.NotBlank;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author ben
 * @since 2024/9/24
 */
@FeignClient(
        value = VarianConstant.VARIAN_SYSTEM,
        fallback = SysBizExceptionFallback.class,
        path = VarianConstant.FEIGN_PREFIX_PATH,
        contextId = "bizExceptionRemote"
)
public interface SysBizExceptionRemote {

    String GET_MESSAGE_BY_CODE = "/bizException/getMessageByCode";

    @GetMapping(GET_MESSAGE_BY_CODE)
    R<String> getMessageByCode(@NotBlank(message = "异常编码不能为空") @RequestParam("bizCode") String bizCode);
}
